package com.dachuang.canjiren.mapper;

import com.dachuang.canjiren.entity.Comment;
import com.dachuang.canjiren.entity.LawComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dachuang.canjiren.entity.VO.CommentVO;
import com.dachuang.canjiren.entity.VO.LawCommentVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2020-07-27
 */
@Repository
public interface LawCommentMapper extends BaseMapper<LawComment> {
    /**
     * 插入法律评论
     * @param lawComment
     * @return
     */
    int insertLawComment(LawComment lawComment);

    /**
     * 法律评论展示
     * @param lawId
     * @return
     */
    List<LawCommentVO> selectLawCommentList(Integer lawId);

    /**
     * 查询法律评论的评论
     * @param parId
     * @return
     */
    List<LawCommentVO> selectLawCommentChildrenList(Integer parId);
}
